/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.card.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.common.core.util.StringUtils;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 有害因素应知卡
 *
 * @author cx
 * @date 2023-08-03 16:01:08
 */
@Data
@TableName("risk_card_notify")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "有害因素应知卡VO")
public class RiskCardNotifyEntityVO extends BaseLogicEntity {

	private static final long serialVersionUID = 1L;


	/**
	 * 标识
	 */

	private Long id;

	/**
	 * 编号
	 */

	private String cardNo;

	/**
	 * 名称
	 */

	private String cardName;

	/**
	 * 风险等级
	 */

	private Integer riskLevel;

	/**
	 * 主要危险有害因素
	 */

	private String mainDesc;

	/**
	 * 易导致的事故风险
	 */

	private String accidentDesc;

	/**
	 * 风险管控措施
	 */
	private String controlDesc;

	/**
	 * 应急处置对策
	 */
	private String handleDesc;

	/**
	 * 安全操作规程
	 */
	private String safeOperationDesc;

	/**
	 * 禁止
	 */
	private String forbidSign;

	/**
	 * 警告
	 */
	private String alarmSign;

	/**
	 * 指令
	 */
	private String cmdSign;

	/**
	 * 文件图片
	 */
	private String file;

	/**
	 * 类型
	 */
	private Integer type;

	/**
	 * 责任人
	 */
	private String kahuna;

	/**
	 * 责任人电话
	 */
	private String kahunaPhone;

	/**
	 * 应急值班室电话
	 */
	private String emergencyTelephone;

	/**
	 * 机构ID
	 */
	private Long orgId;

	public List<String> getForbidSignList() {
		List<String> forbidSignList = new ArrayList<>();
		if (this.forbidSign != null) {
			for (String s : this.forbidSign.split(StringUtils.COMMA)) {
				forbidSignList.add(s);
			}
		}
		return forbidSignList;
	}

	public List<String> getAlarmSignList() {
		List<String> alarmSignList = new ArrayList<>();
		if (this.alarmSign != null) {
			for (String s : this.alarmSign.split(StringUtils.COMMA)) {
				alarmSignList.add(s);
			}
		}
		return alarmSignList;
	}

	public List<String> getCmdSignList() {
		List<String> cmdSignList = new ArrayList<>();
		if (this.cmdSign != null) {
			for (String s : this.cmdSign.split(StringUtils.COMMA)) {
				cmdSignList.add(s);
			}
		}
		return cmdSignList;
	}


}